import { findComponentUpward, findComponentsUpward } from '../../../utils/assist'
export default {
  data () {
    return {
      menu: findComponentUpward(this, 'Menu')
    }
  },
  computed: {
    hasParentSubmenu () {
      return !!findComponentUpward(this, 'Submenu')
    },
    parentSubmenuNum () {
      return findComponentsUpward(this, 'Submenu').length
    },
    mode () {
      return this.menu.mode
    },
    isMenuPopup () {
      return this.menu.isMenuPopup
    },
    isCollape () {
      return this.menu.collapse
    },
    expands () {
      return this.menu.expand
    }
  }
}
